package org.example;

import org.example.service.BookService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class DISetter {
    public static void main(String[] args) {
        //获取IoC容器
        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        //获取bean
        //BookDao bookDao = (BookDao) applicationContext.getBean("bookDao");
        //bookDao.save();

        BookService bookService = (BookService) applicationContext.getBean("bookEbi");
        bookService.save();


    }
}
